#include"processBar.h"                                                                                                                                                                                       

char bar[102] = {};
string lable="|/-\\";

 void my_printf(int rate)
{
    if(rate < 0 || rate > 100) return;
    int len=sizeof(lable);
    //printf("[%-100s]""[%d%%][%c]\r", bar, rate, lable[rate%len]);
    printf(GREEN"[%-100s]" NONE "[%d%%][%c]\r", bar, rate, lable[rate%len]);
    fflush(stdout);
    bar[rate++]=BODY;
    if(rate<100) bar[rate]=RIGHT;
}






